package demoMod.invincibleOne.powers;

import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.PowerStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.AbstractPower;
import demoMod.invincibleOne.InvincibleOneMod;

public class TauntPower extends AbstractPower {
    public static final String POWER_ID = InvincibleOneMod.makeID("TauntPower");
    private static final PowerStrings powerStrings = CardCrawlGame.languagePack.getPowerStrings(POWER_ID);
    public static final String NAME = powerStrings.NAME;
    public static final String[] DESC = powerStrings.DESCRIPTIONS;

    public TauntPower(AbstractCreature owner) {
        this.owner = owner;
        this.ID = POWER_ID;
        this.name = NAME;
        this.amount = -1;
        this.updateDescription();
        loadRegion("painfulStabs");
    }

    @Override
    public void onInitialApplication() {
        for (AbstractMonster monster : AbstractDungeon.getMonsters().monsters) {
            if (monster != owner && monster.hasPower(POWER_ID)) {
                addToBot(new RemoveSpecificPowerAction(monster, monster, POWER_ID));
            }
        }
    }

    @Override
    public void updateDescription() {
        this.description = DESC[0];
    }
}
